Line data Source code
1 : #include "NavigationController.hpp"
2 : #include "IDriveMotor.hpp"
3 :
4 66 : NavigationController::NavigationController(IDriveMotor& motor)
5 66 : : motor_(motor) {}
6 :
7 41 : void NavigationController::moveForward() {
8 41 : motor_.moveForward();
9 41 : }
10 :
11 13 : void NavigationController::moveBackward() {
12 13 : motor_.moveBackward();
13 13 : }
14 :
15 30 : void NavigationController::stop() {
16 30 : motor_.stop();
17 30 : }
18 :
19 16 : void NavigationController::turn(Direction direction) {
20 16 : motor_.turn(direction);
21 16 : }
22 :
23 27 : void NavigationController::rotateRight() {
24 27 : motor_.rotateRight();
25 27 : }
26 :
27 25 : void NavigationController::rotateLeft() {
28 25 : motor_.rotateLeft();
29 25 : }
|